<html>  
<head>  
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />  
</head>  
<script  
    src=" http://ditu.google.cn/maps?file=api&v=2.x&key=ABQIAAAAzr2EBOXUKnm_jVnk0OJI7xSosDVG8KKPE1-m51RBrvYughuyMxQ-i1QfUnH94QxWIa6N4U6MouMmBA&hl=zh-CN"  
    type="text/javascript"></script>  
<input type='text' name='add' id='add' />  
<input type='button' name='btn' id='btn' value='find' onclick='fun()' />  
<script>  
    function fun() {  
        var add = document.getElementById('add').value;  
        getLatLng(add, function(p) {  
            alert(p);  
        });  
    }  
    /** 
     *callback arguments: GLatLng 
     */  
    function getLatLng(address, callback) {  
        var geocoder = new GClientGeocoder();  
        var rtn = null;  
        geocoder.getLatLng(address, callback);  
    }  
</script>  
</html>  